#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include <QPropertyAnimation>

namespace Ui {
class btForm;
}

class btForm : public QWidget
{
    Q_OBJECT

public:
    explicit btForm(QWidget *parent = nullptr);
    ~btForm();

    void seticon(const QString& btIcon, const QString& btText, int pageId);

    // 清除上⼀次按钮点击留下的样式
    void clearBg();

    // 获取id
    int getId() const;

    void showAnimal();
signals:
    void btClick(int id);

protected:
    virtual void mousePressEvent(QMouseEvent *event);

private:
    Ui::btForm *ui;
    int pageId;

    QPropertyAnimation *line1Animal;
    QPropertyAnimation *line2Animal;
    QPropertyAnimation *line3Animal;
    QPropertyAnimation *line4Animal;
};

#endif // BTFORM_H
